package com.celan.year2022.day1218;

import java.util.Scanner;

public class Main1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int n = in.nextInt();
            int minLength = in.nextInt();
            double[] nums = new double[n];
            for (int i = 0; i < n; i++) {
                nums[i] = in.nextDouble();
            }
            int start_res = n;
            int length_res = 0;
            double max = 0;
            int start = 0, end = minLength;
            while (end < n) {
                double calculate = calculate(nums, start, end);
                if (calculate > max) {
                    max = calculate;
                    start_res = start;
                    length_res = end - start + 1;
                } else if (calculate == max) {
                    if (end - start + 1 < length_res) {
                        start_res = start;
                        length_res = end - start + 1;
                    } else if (end - start + 1 == length_res) {
                        if (start < start_res) {
                            start_res = start;
                            length_res = end - start + 1;
                        }
                    }
                }
                start++;
                end++;
            }
            System.out.println(start_res + " " + length_res);
        }
    }

    static double calculate(double[] nums, int start, int end) {
        double sum = 0;
        double k = end - start + 1;
        for (int i = start; i <= end; i++) {
            sum += nums[i] * nums[i];
        }
        return Math.pow(sum, 1.0 / k);
    }
}
